package com.hk.service.impl;

import com.hk.commons.RedisCilent;
import com.hk.service.sys.IUserCache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
public class UserCacheImpl implements IUserCache {


    private Logger logger = LoggerFactory.getLogger(UserCacheImpl.class);

    static  String USER_ASSET_CACHE  = "USER_ASSET_CACHE_";

    @Override
    public Boolean removeUserAssetCache(Long userId) {
        logger.info("will delete user asset cache in the redis, userId ={}", userId);
        RedisCilent.delKey(USER_ASSET_CACHE + userId);
        return true;
    }
}
